#!/bin/bash
hostname=$(hostname)
kernel_version=$(uname -r)
cpu_cores=$(nproc)
memory=$(free -m | awk '/Mem/{print $2}')
disk_usage=$(df -h | grep -vE 'tmpfs|udev')
echo "系统信息报告"
echo "主机名:   ${hostname}"
echo "内核版本:   ${kernel_version}"
echo "CPU核心数:   ${cpu_cores}"
echo "总内存:   ${memory} MB"
echo -e "\n磁盘使用情况:"
echo "${disk_usage}"